<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2023/5/23
  Time: 16:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>书籍列表</title>
</head>
<body>
    <a href="/toAdd">添加</a>
    <table width="500px" border="1px">
        <tr>
            <th>编号</th>
            <th>名称</th>
            <th>作者</th>
            <th>价格</th>
            <th>图片</th>
            <th>操作</th>
        </tr>
        <c:forEach items="${books}" var="book">
            <tr>
                <td>${book.id}</td>
                <td>${book.name}</td>
                <td>${book.author}</td>
                <td>${book.price}</td>
                <td>${book.picture}</td>
                <td>
                    <a href="/find-book?id=${book.id}">更新</a>
                    <a href="/delete-book?id=${book.id}">删除</a>
                </td>
            </tr>
        </c:forEach>
    </table>
</body>

</html>
